<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- stop暂时阻止冒泡 -->
   <a href="https://www.baidu.com" @click.stop="handleClick">百度</a>
   <!-- prevent阻止默认行为 -->
   <a href="https://www.baidu.com" @click.prevent="handleClick">百度</a>
        <!-- once只触发一次 -->
   <button href="https://www.baidu.com" @click.once="handleClick">百度</button>

    </div>

    <script>
        new Vue({
            el: '#app',
            data() {
                return {
                }
            },
            methods: {
                handleClick(){
                    alert('点击了百度');
               }
            }
        })
    </script>
</body>
</html>
